1. Field of the Invention
This invention relates generally to a system and method for authenticating files that are programmed into embedded controller and, more particularly, to a system and method for using asymmetric key digital signatures to authenticate the source and content of binary files that are programmed into a secondary processor in a vehicle electronic control unit (ECU), where the method divides the processing between a main processor and the secondary processor in the ECU to meet the computation resources and security needs.
2. Discussion of the Related Art
Most modern vehicles include electronic control units (ECUs), or controllers, that control the operation of vehicle systems, such as the powertrain, climate control system, infotainment system, body systems, chassis systems, and others. Such controllers require special purpose-designed software in order to perform the control functions. With the increasing number and complexity of these controllers, and the growing threat posed by developers of malicious software, it is more important than ever to authenticate the source and content of binary files that are loaded into automotive controllers. The consequences of using software that is not properly authorized, or worse, maliciously-designed, in a vehicle controller include unintended behavior of the vehicle or its systems, loss of anti-theft features on the vehicle, potential tampering with components such as the odometer, and loss of other vehicle features and functions.
One know digital coding technique is referred to as asymmetric key cryptography that uses digital signatures for authenticating files that are programmed into controllers. As would be well understood by those skilled in the art, asymmetric key cryptography uses a pair of mathematically-related keys, known as a private key and a public key, to encrypt and decrypt a message or file. To create a digital signature, a signer uses his private key, which is known only to himself, to encrypt a message. The digital signature can later be decrypted by another party using the public key, which is paired to the signer's private key.
Flashing is a well known process for uploading software, calibration files and other applications into the memory of a vehicle ECU or other programmable device. A bootloader is an embedded software program loaded on the ECU that provides an interface between the ECU and a programming tool or device that uploads the software. The bootloader typically employs asymmetric key cryptography and stores a public key that must be used to decode the digital signature transferred by the programming tool before allowing the ECU to execute the software.
Many ECUs include more than one processor, where one of the processors may be a main processor having significant computing power (message bit size, RAM size, etc.) and other processors may be secondary processors having limited computing power. A typical modern vehicle may include dozens of ECUs of varying complexity and possibly including various combinations of main processors, including redundant main processors, and secondary processors. When the programming tool is used to reprogram or reflash the processors within the ECU, the programming tool will interact with the main processor and instructions within the signals provided by the programming tool will tell the main processor whether the reflashing is for a particular secondary processor within the ECU.
For the asymmetric digital key coding discussed above, secure programming requires a signature scheme that consists of an encryption part and a message digest or hash part. The encryption part verifies the source authenticity and the hash part verifies the content integrity. These operations require significant computing power. For many secondary processors employed in existing vehicle ECU, it is generally difficult to perform the secure flashing discussed above because these processors are often small 8-bit controllers and do not have the memory space for buffering data for large algorithms. In other words, since the encryption and hash algorithms can take up valuable memory space within the secondary controller, these types of controllers may not be able to perform the necessary secure flashing. Therefore, when programming the less powerful secondary processors in an ECU, there are limits as to how secure that programming can be performed.